package com.example.demo.service;

import com.example.demo.mapper.CourseMapper;
import com.example.demo.vo.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author ：hantao
 * @date ：Created in 2024/12/26 11:44
 * @description：
 */
@Service
public class CourseService {
	@Autowired
	private CourseMapper courseMapper;

	public List<Course> getCourse() {
		return courseMapper.getCourse();
	}

	@Transactional
	public void addCourse(Course course) {
		courseMapper.addCourse(course);
		int i = 1/0;
	}
}
